/* 基础样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.calendar-container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.year-fortune {
    color: #ff4444;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.month {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 1em;
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.95em;
    margin-bottom: 6px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    padding: 4px;
}

.day:hover {
    background: #f0f0f0;
}

.weekend {
    color: #00bcd4;
}

.note-indicator {
    width: 5px;
    height: 5px;
    background: red;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    right: 2px;
}

/* 登录和注册页面样式 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    border-color: #00bcd4;
    outline: none;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-btn {
    flex: 1;
    background: #00bcd4;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.secondary-btn {
    flex: 1;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
}

.primary-btn:hover {
    background: #008ba3;
}

.secondary-btn:hover {
    background: #e5e5e5;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 20px;
    width: 300px;
    border-radius: 8px;
}

.close {
    float: right;
    cursor: pointer;
    font-size: 20px;
}

/* 工具提示样式 */
.day[title] {
    position: relative;
}

.day[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: pre-line;
    z-index: 1000;
    min-width: 120px;
} 

/* Flash 消息样式 */
.flash-messages {
    max-width: 400px;
    margin: 20px auto;
}

.flash-message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* 弹窗样式更新 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-btn {
    flex: 1;
    background: #00bcd4;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn {
    flex: 1;
    background: #ff4444;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn:hover {
    background: #cc0000;
}

/* 确保日历容器适应屏幕 */
#calendar {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .month-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .month-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 添加今天日期的样式 */
.today {
    color: #ff4444 !important; /* 红色，使用 !important 确保优先级 */
    font-weight: bold;
    position: relative;
}

/* 为今天添加圆圈效果 */
.today::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border: 2px solid #ff4444;
    border-radius: 50%;
    z-index: 0;
}